package com.jsnu.xiaochi.controller;

import com.jsnu.xiaochi.service.AdminService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
;import javax.annotation.Resource;

@Controller
public class CategoryController {
    @Resource
    AdminService adminService;
    @RequestMapping("category")
    public String showCategory(Model model){
        model.addAttribute("categorys",adminService.getAllCategory());
        return "category";
    }
}
